let mix = require('laravel-mix');

//前台
mix.js('resources/assets/app/app.js', 'public/js');

//后台
mix.js('resources/assets/admin/app.js', 'public/js/admin')
    .stylus('resources/assets/admin/app.styl', 'public/css/admin');

//别名设置
mix.webpackConfig({
    //不需要webpakck帮你打包的库放入这里，直接页面引入
    externals: {
        'vue': 'Vue',
        'vue-router': 'VueRouter',
    },
    resolve: {
        extensions: ['.js', '.vue', '.json'],
        alias: {
            '~': __dirname + '/resources/assets/admin',
            '~c': __dirname + '/resources/assets/admin/components',
            '@': __dirname + '/resources/assets/app',
            '@c': __dirname + '/resources/assets/app/components',
        },
    },
});

//监控页面刷新
mix.browserSync({
    proxy: 'laravue.test'
});
//编译后提示
//mix.disableNotifications();